﻿@model Physis.Client.Models.ApplicationModel

@{ Layout = "~/Views/ApplicationMaster.cshtml"; }

@section InlineStyles { 

    <style type="text/css">
    
        h3 { background: transparent !important; border: 0px !important; }

        h3 a { white-space: nowrap; }
        
        h4 { padding-left: .125in; padding-top: 0px; margin-top: 0px; }

        h4 a { white-space: nowrap; }

        td.ContentSelectionContainer { 

            background-position-x: center;

            background-position-y: center;
        
            background-repeat: no-repeat;


        }
        
        td.ContentSelectionContainerInactive { 
        
        
        }

        div.ContentSelection {

            width: 240px; 
        
            border-left: 1px solid; 
        
            padding-left: .125in; padding-right: .125in;

            display: none;
        
        }

        .Content { 

            vertical-align: top;

            padding: 0px;

            margin: 0px;
               
        }

        .Loading { 
                
            background-image: url(@Url.Content("~/Assets/Images/Animation/ajax-loader-flower-large.gif")); 
        
            background-position-x: center;

            background-position-y: center;
        
            background-repeat: no-repeat;

        }
        
    </style>

}

<div id="HomeContent" class="ui-widget-content-background ui-widget-content-color TextNormal" style="margin: .06125in; padding: .125in .06125in .125in .25in; border: solid 1px black;">

    <table style="table-layout: fixed;"><tr>

        <td class="ContentRootSelectionContainer" style="width: 230px;">

            <div class="TextNormal" style="overflow: auto; min-height: 400px;">

                @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.EnterpriseManagement)) { 

                <div>

                    <h3><a id="EnterpriseManagement" class="ui-state-hover-color" href="javascript:void(0);" onclick="TopLevelSelection_OnClick(this);">Enterprise Management</a></h3>

                    <h4>Manage configuration for security authorities and environments.</h4>

                </div>   
                    
                }

                @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.SecurityManagement)) { 

                <div>

                    <h3><a id="SecurityManagement" class="ui-state-hover-color" href="javascript:void(0);" onclick="TopLevelSelection_OnClick(this);">Security Management</a></h3>

                    <h4>Manage Roles (groups) and User permissions across all environments.</h4>

                </div>
                    
                }
    
                @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.ServerManagement)) { 

                <div>

                    <h3><a id="ServerManagement" class="ui-state-hover-color" href="javascript:void(0);" onclick="TopLevelSelection_OnClick(this);">Server Management</a></h3>

                    <h4>Manage server resources and infrastructure.</h4>


                </div>
                    
                }
                
                @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.Monitoring)) { 
                    
                <div>

                    <h3><a id="MonitoringInstrumentation" class="ui-state-hover-color" href="javascript:void(0);" onclick="TopLevelSelection_OnClick(this);">Monitoring and Instrumentation</a></h3>

                    <h4>Monitor the sessions and review the audit logs.</h4>

                </div>
                    
                }

            </div>

        </td>
        
        <td class="ContentSelectionContainer" style="width: 250px;">
            
            @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.EnterpriseManagement)) { 
                    
            <div id="EnterpriseManagementSelection" class="ContentSelection">
                        
                <h3>Enterprise Management</h3>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="EnterpriseManagementSelection" objectType="SecurityAuthority" controller="EnterpriseManagement">Security Authorities</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="EnterpriseManagementSelection" objectType="Environment" controller="EnterpriseManagement">Environments</a></h4>
                        
                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="CloseAllSelections_OnClick(this);" parentId="EnterpriseManagementSelection">(close)</a></h4>

            </div>
                    
            }
                    
            @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.SecurityManagement)) { 

            <div id="SecurityManagementSelection" class="ContentSelection">
                        
                <h3>Security Management</h3>
                        
                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="SecurityManagementSelection" objectType="EnterpriseRole" controller="SecurityManagement">Enterprise Roles</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="SecurityManagementSelection" objectType="EnvironmentRole" controller="SecurityManagement">Environment Roles</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="SecurityManagementSelection" objectType="UserAccount" controller="SecurityManagement">Users</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="CloseAllSelections_OnClick(this);" parentId="SecurityManagementSelection">(close)</a></h4>

            </div>
                
            }
             
            @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.ServerManagement)) { 
                                   
            <div id="ServerManagementSelection" class="ContentSelection">
                        
                <h3>Server Management</h3>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="ServerManagementSelection">Web Application Servers</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="ServerManagementSelection">Reporting Servers</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="ServerManagementSelection">Fax Servers</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="ServerManagementSelection">Print Servers</a></h4>
                        
                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="CloseAllSelections_OnClick(this);" parentId="ServerManagementSelection">(close)</a></h4>

            </div>
                
            }

            @if (Model.Application.Session.HasEnterprisePermission (Physis.Security.Permissions.Enterprise.Monitoring)) { 

            <div id="MonitoringInstrumentationSelection" class="ContentSelection">

                <h3>Monitoring and Instrumentation</h3>
                    
                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="MonitoringInstrumentationSelection">Active Sessions</a></h4>

                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="ContentSelection_OnClick(this);" parentId="MonitoringInstrumentationSelection">Audit Logs and Tracing</a></h4>
                        
                <h4><a class="ui-state-hover-color" href="javascript:void(0);" onclick="CloseAllSelections_OnClick(this);" parentId="MonitoringInstrumentationSelection">(close)</a></h4>

            </div>           
                
            }

        </td>
        
        <td class="Content">

            <div id="ContentHeader" class="ui-widget-header" style="margin-top: 0px; padding: 5px; display: none;"></div>
                    
            <div id="ContentBody" class="Content" style="display: none;">

                <table id="ContentGrid"></table>

                <div id="ContentGridPager"></div>

            </div>                    

        </td>

    </tr></table>

</div>

<script type="text/javascript" src="~/Scripts/Application/Home/HomeIndex.js" ></script>